import React from 'react'
import CheckImg from '../../resources/images/check.png'
const OnlyWithAudoCheckbox = ({setConnectOnlyWithAudio,connectOnlyWithAudio}) => {
    const handleConnectionTypeChange = () => {
        setConnectOnlyWithAudio(!connectOnlyWithAudio);
    };
  return (
    <div className='checkbox_container'>
        <div className='checkbox_connection'onClick={handleConnectionTypeChange}>
            {connectOnlyWithAudio && <img className='check_image' src={CheckImg}></img>}
        </div>
        <p className='checkbox_container_paragraph'>只开启音频</p>
    </div>
  )
}

export default OnlyWithAudoCheckbox